<?php
namespace App\Lib\PHPExcel\ManuOrder;

use App\Lib\PHPExcel\ExcelHandle;

class OrderRefund1 extends ExcelHandle
{
    /*
     *退货订单
     * */
    public function arrange($origin_arr)
    {

        $arr = [
            0 => [
                '店铺', '订单ID','产品','货号', '尺寸','颜色','进货价','售价','姓名','电话','退回物流','状态','处理进度','登记日期','下单时间','库存','售卖类型'
            ]
        ];
        $i = 1;
        foreach ($origin_arr as $data) {
            $arr[$i]['店铺']      = $data['shop_name'];
            $arr[$i]['订单ID']    = $data['order_id'];
            $arr[$i]['产品']      = $data['origin_prod_name'];
            $arr[$i]['货号']      = $data['prod_no'];
            $arr[$i]['尺寸']      = $data['size'];
            $arr[$i]['颜色']      = $data['color'];
            $arr[$i]['进货价']    = $data['cost_price'];
            $arr[$i]['售价']      = $data['combo_amount'];
            $arr[$i]['姓名']      = $data['post_receiver'];
            $arr[$i]['电话']      = $data['post_tel'];
            $arr[$i]['退回物流']    = $data['logistics_code'];
            $arr[$i]['状态']        = $data['order_status_text'];
            $arr[$i]['处理进度']    = $data['progress_text'];
            $arr[$i]['登记日期']    = $data['reg_time'];
            $arr[$i]['下单时间']    = $data['create_time'];
            $arr[$i]['库存']        = $data['stock'];
            $arr[$i]['售卖类型']    = $data['sale_type'];
            $i++;
        }

        return $arr;
    }


}